/**
 * Copyright 2025 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

.popover {
    min-inline-size: var(--mod-spectrum-contextual-help-minimum-width, var(--spectrum-contextual-help-minimum-width));
    padding-block: var(--mod-spectrum-contextual-help-padding, var(--spectrum-spacing-400));
    padding-inline: var(--mod-spectrum-contextual-help-padding, var(--spectrum-spacing-400));
    font-size: var(--mod-spectrum-contextual-help-body-size, var(--spectrum-contextual-help-body-size));
    color: var(--highcontrast-contextual-help-body-color, var(--mod-contextual-help-body-color, var(--spectrum-body-color)));
    max-inline-size: var(--mod-spectrum-contextual-help-popover-maximum-width);
    position: relative;
}

.popover .body,
.popover ::slotted([slot="heading"]) {
    margin: 0;
}

.popover ::slotted([slot="heading"]) {
    font-size: var(--mod-spectrum-contextual-help-heading-size, var(--spectrum-contextual-help-title-size));
    color: var(--highcontrast-contextual-help-heading-color, var(--mod-contextual-help-heading-color, var(--spectrum-heading-color)));
    margin-block-end: var(--mod-spectrum-contextual-help-content-spacing, var(--spectrum-contextual-help-content-spacing));
}

::slotted([slot="link"]) {
    margin-block-start: var(--mod-spectrum-contextual-help-link-spacing, var(--spectrum-spacing-300));
}

@media (forced-colors: active) {
    :host {
        --highcontrast-contextual-help-heading-color: CanvasText;
        --highcontrast-contextual-help-body-color: CanvasText;
    }
}
